package cn.genmer.test.security.amap;

import cn.genmer.test.security.common.AmapKeyEnum;
import cn.genmer.test.security.utils.HttpSendClient;

import java.io.IOException;

/**
 * 高德web服务调用
 */
public class AmapServerCall {

    /**
     * 高德正向地理编码接口
     */
    private static final String AMAP_GEO_URL = "http://restapi.amap.com/v3/geocode/geo?";
//  //restapi.amap.com/v3/geocode/geo?key=c07db1d1655382d2ad2e674a7bb598d3&address=方恒国际中心A座&city=北京
    public static void main(String[] args) throws IOException {
        String adress = "福建省福州市鼓楼区灰炉新苑";
        String param = "address=" + adress + "&key=" + AmapKeyEnum.WEBSERVER.getKey();


        System.out.println( HttpSendClient.doGet(AMAP_GEO_URL + param));
    }
}
